package com.huatao.auth.application.util;

import com.huatao.auth.infra.basic.entity.AuthRole;

public class LoginUserHolder {

    public static ThreadLocal<AuthRole> threadLocal = new ThreadLocal<>();

    public static void setLoginUser(AuthRole authRole) {
        threadLocal.set(authRole);
    }

    public static AuthRole getLoginUser() {
        return threadLocal.get();
    }

    public static void remove() {
        threadLocal.remove();
    }

}
